﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace LimaLims.Database.Migrations.Migrations
{
    /// <inheritdoc />
    public partial class init : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "DealOpinion",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "编号"),
                    Opinion = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "意见"),
                    IsAssess = table.Column<bool>(type: "bit", nullable: false, comment: "是否评审意见"),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DealOpinion", x => x.Id);
                },
                comment: "处理意见");

            migrationBuilder.CreateTable(
                name: "DefectiveReason",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "编号"),
                    Reason = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "原因"),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DefectiveReason", x => x.Id);
                },
                comment: "不良品原因表");

            migrationBuilder.CreateTable(
                name: "EquipmentCategory",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "分类名称"),
                    ParentId = table.Column<long>(type: "bigint", nullable: true, comment: "所属父类Id"),
                    Pids = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "父Ids"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EquipmentCategory", x => x.Id);
                },
                comment: "仪器分类表");

            migrationBuilder.CreateTable(
                name: "EquipmentFactory",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "厂家名称"),
                    ContactName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "联系人"),
                    Phone = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "电话"),
                    Address = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "联系地址"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EquipmentFactory", x => x.Id);
                },
                comment: "仪器厂家信息");

            migrationBuilder.CreateTable(
                name: "ExperimentStation",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "名称"),
                    Inspector = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "检验员"),
                    QualityChief = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "质检科长"),
                    Checker = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "审核人"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ExperimentStation", x => x.Id);
                },
                comment: "试验站信息");

            migrationBuilder.CreateTable(
                name: "InspectionItem",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "编号"),
                    InspectionName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "试验项目名称"),
                    InspectionType = table.Column<int>(type: "int", nullable: false, comment: "试验项目类别"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "检验方法及要求"),
                    NsTargetValue = table.Column<float>(type: "real", nullable: true, comment: "国标值"),
                    NsLowerLimit = table.Column<float>(type: "real", nullable: true, comment: "规格下限"),
                    NsUpperLimit = table.Column<float>(type: "real", nullable: true, comment: "规格上限"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_InspectionItem", x => x.Id);
                },
                comment: "检验项目");

            migrationBuilder.CreateTable(
                name: "InspectionScheme",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "编号"),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "名称"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_InspectionScheme", x => x.Id);
                },
                comment: "检验方案");

            migrationBuilder.CreateTable(
                name: "PrintTemplate",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "模板名称"),
                    TemplateFile = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "模板文件"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_PrintTemplate", x => x.Id);
                },
                comment: "模板管理");

            migrationBuilder.CreateTable(
                name: "SerialNumberLog",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    BusinessType = table.Column<int>(type: "int", nullable: false, comment: "业务类型"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "业务编号"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SerialNumberLog", x => x.Id);
                },
                comment: "编号日志表");

            migrationBuilder.CreateTable(
                name: "SerialNumberRules",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    BusinessType = table.Column<int>(type: "int", nullable: false, comment: "业务类型"),
                    Prefix = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "业务前缀"),
                    RulesDateType = table.Column<int>(type: "int", nullable: false, comment: "日期格式"),
                    Digit = table.Column<int>(type: "int", nullable: false, comment: "流水号位数"),
                    RulesText = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "编号生成规则"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SerialNumberRules", x => x.Id);
                },
                comment: "编号规则表");

            migrationBuilder.CreateTable(
                name: "Supplier",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "名称"),
                    Level = table.Column<int>(type: "int", nullable: false, comment: "供应商等级"),
                    ContactName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "联系人"),
                    Address = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "联系地址"),
                    Phone = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "电话"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Supplier", x => x.Id);
                },
                comment: "供应商信息");

            migrationBuilder.CreateTable(
                name: "SysDictType",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "名称"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "编码"),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysDictType", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "SysFile",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    FileLocation = table.Column<int>(type: "int", nullable: false, comment: "文件存储位置"),
                    FileBucket = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "文件仓库"),
                    FileOriginName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "文件名称"),
                    FileSuffix = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "文件后缀"),
                    FileSizeKb = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true, comment: "文件大小kb"),
                    FileSizeInfo = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "文件大小信息"),
                    FileObjectName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "存储到bucket的名称"),
                    FilePath = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "存储路径"),
                    SysFileGroupId = table.Column<long>(type: "bigint", nullable: true, comment: "素材分组Id"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysFile", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "SysFileGroup",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Title = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "分组名称"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysFileGroup", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "SysLogEx",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Account = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "操作人"),
                    Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "名称"),
                    ClassName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "类名"),
                    MethodName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "方法名"),
                    ExceptionName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "异常名称"),
                    ExceptionMsg = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "异常信息"),
                    ExceptionSource = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "异常源"),
                    StackTrace = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "堆栈信息"),
                    ParamsObj = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "参数对象"),
                    ExceptionTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "异常时间"),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysLogEx", x => x.Id);
                },
                comment: "异常日志表");

            migrationBuilder.CreateTable(
                name: "SysLogOp",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "名称"),
                    Success = table.Column<int>(type: "int", nullable: false, comment: "是否执行成功"),
                    Message = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "具体消息"),
                    Ip = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "IP"),
                    Location = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true, comment: "地址"),
                    Browser = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "浏览器"),
                    Os = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "操作系统"),
                    Url = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "请求地址"),
                    ClassName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "类名称"),
                    MethodName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "方法名称"),
                    ReqMethod = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true, comment: "请求方式"),
                    Param = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "请求参数"),
                    Result = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "返回结果"),
                    ElapsedTime = table.Column<long>(type: "bigint", nullable: false, comment: "耗时"),
                    OpTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "操作时间"),
                    Account = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "操作人"),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysLogOp", x => x.Id);
                },
                comment: "操作日志表");

            migrationBuilder.CreateTable(
                name: "SysLogVis",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "名称"),
                    Success = table.Column<int>(type: "int", nullable: false, comment: "是否执行成功"),
                    Message = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "具体消息"),
                    Ip = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "IP"),
                    Location = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true, comment: "地址"),
                    Browser = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "浏览器"),
                    Os = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "操作系统"),
                    VisType = table.Column<int>(type: "int", nullable: false, comment: "访问类型"),
                    VisTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "访问时间"),
                    Account = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "访问人"),
                    TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysLogVis", x => x.Id);
                },
                comment: "访问日志表");

            migrationBuilder.CreateTable(
                name: "SysMenu",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Pid = table.Column<long>(type: "bigint", nullable: false, comment: "父Id"),
                    Pids = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "父Ids"),
                    Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "名称"),
                    Code = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false, comment: "编码"),
                    Type = table.Column<int>(type: "int", nullable: false, comment: "菜单类型"),
                    Icon = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "图标"),
                    Router = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "路由地址"),
                    Component = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "组件地址"),
                    Permission = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "权限标识"),
                    OpenType = table.Column<int>(type: "int", nullable: false, comment: "打开方式"),
                    Link = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "内链地址"),
                    Redirect = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "重定向地址"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysMenu", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "SysNotice",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Title = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false, comment: "标题"),
                    Content = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "内容"),
                    Status = table.Column<int>(type: "int", nullable: false, comment: "状态"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysNotice", x => x.Id);
                },
                comment: "系统通知");

            migrationBuilder.CreateTable(
                name: "SysRole",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "名称"),
                    Code = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false, comment: "编码"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysRole", x => x.Id);
                },
                comment: "角色表");

            migrationBuilder.CreateTable(
                name: "SysTenant",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Name = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false, comment: "公司名称"),
                    AdminName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "管理员名称"),
                    Email = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "电子邮箱"),
                    Phone = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "电话"),
                    Remark = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysTenant", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "EquipmentInfo",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "编号"),
                    Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "名称"),
                    EquipmentCategoryId = table.Column<long>(type: "bigint", nullable: false, comment: "仪器分类Id"),
                    Specification = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "规格型号"),
                    Degree = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "精度"),
                    EquipmentImage = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "仪器图片"),
                    ProduceTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "生产日期"),
                    BuyTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "购买日期"),
                    EquipmentFactoryId = table.Column<long>(type: "bigint", nullable: false, comment: "仪器厂家Id "),
                    ExperimentStationId = table.Column<long>(type: "bigint", nullable: false, comment: "所属试验站Id "),
                    EquipmentStatus = table.Column<int>(type: "int", nullable: false, comment: "仪器状态"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EquipmentInfo", x => x.Id);
                    table.ForeignKey(
                        name: "FK_EquipmentInfo_EquipmentCategory_EquipmentCategoryId",
                        column: x => x.EquipmentCategoryId,
                        principalTable: "EquipmentCategory",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_EquipmentInfo_EquipmentFactory_EquipmentFactoryId",
                        column: x => x.EquipmentFactoryId,
                        principalTable: "EquipmentFactory",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_EquipmentInfo_ExperimentStation_ExperimentStationId",
                        column: x => x.ExperimentStationId,
                        principalTable: "ExperimentStation",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "设备仪器");

            migrationBuilder.CreateTable(
                name: "Team",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    WorkName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "车间名称"),
                    Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "名称"),
                    ExperimentStationId = table.Column<long>(type: "bigint", nullable: true, comment: "所属试验站"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Team", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Team_ExperimentStation_ExperimentStationId",
                        column: x => x.ExperimentStationId,
                        principalTable: "ExperimentStation",
                        principalColumn: "Id");
                },
                comment: "班组管理");

            migrationBuilder.CreateTable(
                name: "InspectionData",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "试验项目编号"),
                    InspectionName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "试验项目名称"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "检验方法及要求"),
                    InspectionType = table.Column<int>(type: "int", nullable: false, comment: "试验项目类别"),
                    InspectionSchemeId = table.Column<long>(type: "bigint", nullable: false, comment: "检验方案Id"),
                    NsTargetValue = table.Column<float>(type: "real", nullable: true, comment: "国标值"),
                    NsLowerLimit = table.Column<float>(type: "real", nullable: true, comment: "国标规格下限"),
                    NsUpperLimit = table.Column<float>(type: "real", nullable: true, comment: "国标规格上限"),
                    SjTargetValue = table.Column<float>(type: "real", nullable: true, comment: "客户设计值"),
                    SjLowerLimit = table.Column<float>(type: "real", nullable: true, comment: "设计规格下限"),
                    SjUpperLimit = table.Column<float>(type: "real", nullable: true, comment: "设计规格上限"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_InspectionData", x => x.Id);
                    table.ForeignKey(
                        name: "FK_InspectionData_InspectionScheme_InspectionSchemeId",
                        column: x => x.InspectionSchemeId,
                        principalTable: "InspectionScheme",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "检验方案项目");

            migrationBuilder.CreateTable(
                name: "ProductCategory",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Name = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "分类名称"),
                    ParentId = table.Column<long>(type: "bigint", nullable: true, comment: "所属父类Id"),
                    Pids = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "父Ids"),
                    PrintTemplateId = table.Column<long>(type: "bigint", nullable: true, comment: "打印模板ID"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ProductCategory", x => x.Id);
                    table.ForeignKey(
                        name: "FK_ProductCategory_PrintTemplate_PrintTemplateId",
                        column: x => x.PrintTemplateId,
                        principalTable: "PrintTemplate",
                        principalColumn: "Id");
                },
                comment: "产品分类表");

            migrationBuilder.CreateTable(
                name: "Material",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "名称"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "批次号"),
                    Specification = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "规格型号"),
                    Unit = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "单位"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "备注"),
                    SupplierId = table.Column<long>(type: "bigint", nullable: false, comment: "供应商ID"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Material", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Material_Supplier_SupplierId",
                        column: x => x.SupplierId,
                        principalTable: "Supplier",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "物料信息表");

            migrationBuilder.CreateTable(
                name: "SysDictData",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    DictTypeId = table.Column<long>(type: "bigint", nullable: false, comment: "字典类型编码"),
                    Value = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "字典值"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "编码"),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysDictData", x => x.Id);
                    table.ForeignKey(
                        name: "FK_SysDictData_SysDictType_DictTypeId",
                        column: x => x.DictTypeId,
                        principalTable: "SysDictType",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "SysRoleMenu",
                columns: table => new
                {
                    SysRoleId = table.Column<long>(type: "bigint", nullable: false, comment: "角色Id"),
                    SysMenuId = table.Column<long>(type: "bigint", nullable: false, comment: "菜单Id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysRoleMenu", x => new { x.SysRoleId, x.SysMenuId });
                    table.ForeignKey(
                        name: "FK_SysRoleMenu_SysMenu_SysMenuId",
                        column: x => x.SysMenuId,
                        principalTable: "SysMenu",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_SysRoleMenu_SysRole_SysRoleId",
                        column: x => x.SysRoleId,
                        principalTable: "SysRole",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "角色菜单表");

            migrationBuilder.CreateTable(
                name: "EquipmentRepair",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "报修工单编号"),
                    EquipmentId = table.Column<long>(type: "bigint", nullable: false, comment: "设备仪器ID"),
                    FaultDescription = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "故障描述"),
                    FaultImage = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "故障情况拍照"),
                    FaultVideo = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "故障情况视频"),
                    DealOpinon = table.Column<int>(type: "int", nullable: true, comment: "审核意见"),
                    DealDescription = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "审核情况说明"),
                    DealUser = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "审核人"),
                    DealTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "审核时间"),
                    IsRepaired = table.Column<bool>(type: "bit", nullable: true, comment: "是否修复"),
                    AcceptDescription = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "验收情况说明"),
                    AcceptImage = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "验收完成拍照"),
                    AcceptUser = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "验收人"),
                    AcceptTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "验收时间"),
                    EquipmentStatusBackup = table.Column<int>(type: "int", nullable: false, comment: "备份仪器状态"),
                    Status = table.Column<int>(type: "int", nullable: false, comment: "状态"),
                    ReportUrl = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "打印单据"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EquipmentRepair", x => x.Id);
                    table.ForeignKey(
                        name: "FK_EquipmentRepair_EquipmentInfo_EquipmentId",
                        column: x => x.EquipmentId,
                        principalTable: "EquipmentInfo",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "报修工单");

            migrationBuilder.CreateTable(
                name: "ExperimentPlan",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "计划编号"),
                    TeamId = table.Column<long>(type: "bigint", nullable: false, comment: "班组Id"),
                    Type = table.Column<int>(type: "int", nullable: false, comment: "计划类型"),
                    PlanStatus = table.Column<int>(type: "int", nullable: false, comment: "计划状态"),
                    PlanStartTime = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "计划开始时间"),
                    PlanEndTime = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "计划完成时间"),
                    ActualStartTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "实际开始时间"),
                    ActualEndTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "实际完成时间"),
                    InspectionSchemeId = table.Column<long>(type: "bigint", nullable: false, comment: "检验方案Id"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ExperimentPlan", x => x.Id);
                    table.ForeignKey(
                        name: "FK_ExperimentPlan_InspectionScheme_InspectionSchemeId",
                        column: x => x.InspectionSchemeId,
                        principalTable: "InspectionScheme",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_ExperimentPlan_Team_TeamId",
                        column: x => x.TeamId,
                        principalTable: "Team",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "试验计划");

            migrationBuilder.CreateTable(
                name: "SysUser",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Account = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "账号"),
                    Password = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "密码"),
                    Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "姓名"),
                    Avatar = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "头像"),
                    Birthday = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "生日"),
                    Sex = table.Column<int>(type: "int", nullable: false, comment: "性别-男_1、女_2"),
                    Email = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "邮箱"),
                    Phone = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "手机"),
                    Tel = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "电话"),
                    LastLoginIp = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true, comment: "最后登录IP"),
                    TeamId = table.Column<long>(type: "bigint", nullable: false, comment: "班组Id"),
                    LastLoginTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "最后登录时间"),
                    AdminType = table.Column<int>(type: "int", nullable: false, comment: "管理员类型-平台管理员_1、租户管理员_2、普通账号_3"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysUser", x => x.Id);
                    table.ForeignKey(
                        name: "FK_SysUser_Team_TeamId",
                        column: x => x.TeamId,
                        principalTable: "Team",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Restrict);
                },
                comment: "用户表");

            migrationBuilder.CreateTable(
                name: "InspectionDataResult",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    ExperimentTaskId = table.Column<long>(type: "bigint", nullable: false, comment: "试验任务Id"),
                    InspectionDataId = table.Column<long>(type: "bigint", nullable: false, comment: "试验项目ID"),
                    ExperimentValue = table.Column<float>(type: "real", nullable: false, comment: "试验值"),
                    ExperimentRemark = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "试验描述"),
                    ImagePath = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "试验波形图"),
                    Result = table.Column<int>(type: "int", nullable: true, comment: "试验结果"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_InspectionDataResult", x => x.Id);
                    table.ForeignKey(
                        name: "FK_InspectionDataResult_InspectionData_InspectionDataId",
                        column: x => x.InspectionDataId,
                        principalTable: "InspectionData",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "检验方案项目结果表");

            migrationBuilder.CreateTable(
                name: "ProjectDrawing",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "编号"),
                    ProjectName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "项目图纸名称"),
                    ProductCategoryId = table.Column<long>(type: "bigint", nullable: false, comment: "产品分类ID"),
                    ProducName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "产品名称"),
                    ProductCount = table.Column<int>(type: "int", nullable: false, comment: "产品数量"),
                    Unit = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "单位"),
                    Specification = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "规格型号"),
                    ProductSymbol = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "产品代号"),
                    PhaseNumber = table.Column<int>(type: "int", nullable: false, comment: "相数"),
                    Frequency = table.Column<int>(type: "int", nullable: false, comment: "频率Hz"),
                    RatedCapacity = table.Column<int>(type: "int", nullable: false, comment: "额定容量kVA"),
                    HighVoltageRatedCurrent = table.Column<float>(type: "real", nullable: true, comment: "高压额定电流(A)"),
                    LowVoltageRatedCurrent = table.Column<float>(type: "real", nullable: true, comment: "低压额定电流(A)"),
                    HighVoltageRatedVoltage = table.Column<float>(type: "real", nullable: true, comment: "高压额定电压(kV)"),
                    LowVoltageRatedVoltage = table.Column<float>(type: "real", nullable: true, comment: "低压额定电压(kV)"),
                    CoolingMode = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "冷却方式"),
                    InsulationClass = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "绝缘等级"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ProjectDrawing", x => x.Id);
                    table.ForeignKey(
                        name: "FK_ProjectDrawing_ProductCategory_ProductCategoryId",
                        column: x => x.ProductCategoryId,
                        principalTable: "ProductCategory",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "项目图纸-技术参数表");

            migrationBuilder.CreateTable(
                name: "ExperimentPlanMaterial",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    ExperimentPlanId = table.Column<long>(type: "bigint", nullable: false, comment: "计划Id"),
                    MaterialId = table.Column<long>(type: "bigint", nullable: false, comment: "物料Id"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ExperimentPlanMaterial", x => x.Id);
                    table.ForeignKey(
                        name: "FK_ExperimentPlanMaterial_ExperimentPlan_ExperimentPlanId",
                        column: x => x.ExperimentPlanId,
                        principalTable: "ExperimentPlan",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_ExperimentPlanMaterial_Material_MaterialId",
                        column: x => x.MaterialId,
                        principalTable: "Material",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "ExperimentTask",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    TaskCode = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "任务编号"),
                    ExperimentPlanId = table.Column<long>(type: "bigint", nullable: false, comment: "试验计划ID"),
                    ExperimentUserId = table.Column<long>(type: "bigint", nullable: true, comment: "试验员Id"),
                    ExperimentUserName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "试验员名称"),
                    TeamId = table.Column<long>(type: "bigint", nullable: false, comment: "班组Id"),
                    TeamName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "班组名称"),
                    PlanStartTime = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "计划开始时间"),
                    PlanEndTime = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "计划完成时间"),
                    ActualStartTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "实际开始时间"),
                    ActualEndTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "实际完成时间"),
                    TargetId = table.Column<long>(type: "bigint", nullable: false, comment: "试验对象Id"),
                    TargetCode = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "试验对象编号"),
                    TargetName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "试验对象名称"),
                    TaskType = table.Column<int>(type: "int", nullable: false, comment: "任务类型"),
                    RejectsHandlingId = table.Column<long>(type: "bigint", nullable: false, comment: "不良品处理结果Id"),
                    RejectsRemark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "不合格原因描述"),
                    Status = table.Column<int>(type: "int", nullable: false, comment: "任务状态"),
                    Result = table.Column<int>(type: "int", nullable: true, comment: "试验结果"),
                    ReportUrl = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "试验报告URL"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ExperimentTask", x => x.Id);
                    table.ForeignKey(
                        name: "FK_ExperimentTask_ExperimentPlan_ExperimentPlanId",
                        column: x => x.ExperimentPlanId,
                        principalTable: "ExperimentPlan",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "试验任务");

            migrationBuilder.CreateTable(
                name: "SysUserRole",
                columns: table => new
                {
                    SysUserId = table.Column<long>(type: "bigint", nullable: false, comment: "用户Id"),
                    SysRoleId = table.Column<long>(type: "bigint", nullable: false, comment: "角色Id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_SysUserRole", x => new { x.SysUserId, x.SysRoleId });
                    table.ForeignKey(
                        name: "FK_SysUserRole_SysRole_SysRoleId",
                        column: x => x.SysRoleId,
                        principalTable: "SysRole",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_SysUserRole_SysUser_SysUserId",
                        column: x => x.SysUserId,
                        principalTable: "SysUser",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "用户角色表");

            migrationBuilder.CreateTable(
                name: "Product",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Name = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false, comment: "名称"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "编号"),
                    FactoryNumbe = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "出厂编号"),
                    CategoryId = table.Column<long>(type: "bigint", nullable: false, comment: "产品分类"),
                    ProjectDrawingId = table.Column<long>(type: "bigint", nullable: true, comment: "产品项目图纸编号"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "备注"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Product", x => x.Id);
                    table.ForeignKey(
                        name: "FK_Product_ProductCategory_CategoryId",
                        column: x => x.CategoryId,
                        principalTable: "ProductCategory",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_Product_ProjectDrawing_ProjectDrawingId",
                        column: x => x.ProjectDrawingId,
                        principalTable: "ProjectDrawing",
                        principalColumn: "Id");
                },
                comment: "产品信息表");

            migrationBuilder.CreateTable(
                name: "AcsdTest",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    FactoryNumbe = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "出厂编号"),
                    ExperimentTaskId = table.Column<long>(type: "bigint", nullable: true, comment: "试验任务ID"),
                    EquipmentInfoId = table.Column<long>(type: "bigint", nullable: false, comment: "设备Id"),
                    AmbientTemperature = table.Column<float>(type: "real", nullable: true, comment: "环境温度"),
                    AmbientHumidity = table.Column<float>(type: "real", nullable: true, comment: "环境湿度"),
                    AtmosphericPressure = table.Column<float>(type: "real", nullable: true, comment: "大气压力"),
                    Frequency = table.Column<float>(type: "real", nullable: true, comment: "频率"),
                    HighVoltage = table.Column<float>(type: "real", nullable: true, comment: "高压电压"),
                    LowVoltage = table.Column<float>(type: "real", nullable: true, comment: "低压电压"),
                    PressurizedPart = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "加压部位"),
                    TestTime = table.Column<int>(type: "int", nullable: true, comment: "试验时间"),
                    Result = table.Column<int>(type: "int", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AcsdTest", x => x.Id);
                    table.ForeignKey(
                        name: "FK_AcsdTest_EquipmentInfo_EquipmentInfoId",
                        column: x => x.EquipmentInfoId,
                        principalTable: "EquipmentInfo",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_AcsdTest_ExperimentTask_ExperimentTaskId",
                        column: x => x.ExperimentTaskId,
                        principalTable: "ExperimentTask",
                        principalColumn: "Id");
                },
                comment: "感应耐压试验信息");

            migrationBuilder.CreateTable(
                name: "ChromTest",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    ChromId = table.Column<int>(type: "int", nullable: false, comment: "色谱机ID(区分是否上传)"),
                    ExperimentTaskId = table.Column<long>(type: "bigint", nullable: true, comment: "试验任务ID"),
                    EquipmentInfoId = table.Column<long>(type: "bigint", nullable: false, comment: "设备Id"),
                    AmbientTemperature = table.Column<float>(type: "real", nullable: true, comment: "环境温度"),
                    AmbientHumidity = table.Column<float>(type: "real", nullable: true, comment: "环境湿度"),
                    H2 = table.Column<float>(type: "real", nullable: true, comment: "氢气"),
                    CO = table.Column<float>(type: "real", nullable: true, comment: "一氧化碳"),
                    CO2 = table.Column<float>(type: "real", nullable: true, comment: "二氧化碳"),
                    CH4 = table.Column<float>(type: "real", nullable: true, comment: "甲烷"),
                    C2H4 = table.Column<float>(type: "real", nullable: true, comment: "乙烯"),
                    C2H6 = table.Column<float>(type: "real", nullable: true, comment: "乙烷"),
                    C2H2 = table.Column<float>(type: "real", nullable: true, comment: "乙炔"),
                    O2 = table.Column<float>(type: "real", nullable: true, comment: "氧"),
                    N2 = table.Column<float>(type: "real", nullable: true, comment: "氮"),
                    Voc = table.Column<float>(type: "real", nullable: true, comment: "总烃"),
                    Memo = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "备注"),
                    DiagnoseResult = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "诊断结果"),
                    SamplingDate = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "取样日期"),
                    TestDate = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "测试日期"),
                    Result = table.Column<int>(type: "int", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ChromTest", x => x.Id);
                    table.ForeignKey(
                        name: "FK_ChromTest_EquipmentInfo_EquipmentInfoId",
                        column: x => x.EquipmentInfoId,
                        principalTable: "EquipmentInfo",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_ChromTest_ExperimentTask_ExperimentTaskId",
                        column: x => x.ExperimentTaskId,
                        principalTable: "ExperimentTask",
                        principalColumn: "Id");
                },
                comment: "色谱试验信息");

            migrationBuilder.CreateTable(
                name: "DcResistance",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    FactoryNumbe = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "出厂编号"),
                    ExperimentTaskId = table.Column<long>(type: "bigint", nullable: true, comment: "试验任务ID"),
                    EquipmentInfoId = table.Column<long>(type: "bigint", nullable: false, comment: "设备Id"),
                    AmbientTemperature = table.Column<float>(type: "real", nullable: true, comment: "环境温度"),
                    AmbientHumidity = table.Column<float>(type: "real", nullable: true, comment: "环境湿度"),
                    TappingGear = table.Column<int>(type: "int", nullable: false, comment: "分接位置"),
                    HighAB = table.Column<float>(type: "real", nullable: true, comment: "高压AB（Ω）"),
                    HighBC = table.Column<float>(type: "real", nullable: true),
                    HighCA = table.Column<float>(type: "real", nullable: true),
                    HighUnbalanceRate = table.Column<float>(type: "real", nullable: true),
                    Lowab = table.Column<float>(type: "real", nullable: true, comment: "低压ab"),
                    Lowbc = table.Column<float>(type: "real", nullable: true),
                    Lowca = table.Column<float>(type: "real", nullable: true),
                    LowUnbalanceRate = table.Column<float>(type: "real", nullable: true),
                    Lowa0 = table.Column<float>(type: "real", nullable: true, comment: "相电阻a0电阻值"),
                    Lowb0 = table.Column<float>(type: "real", nullable: true),
                    Lowc0 = table.Column<float>(type: "real", nullable: true),
                    Low0UnbalanceRate = table.Column<float>(type: "real", nullable: true),
                    HighA0 = table.Column<float>(type: "real", nullable: true, comment: "高压侧相电阻A0电阻值"),
                    HighB0 = table.Column<float>(type: "real", nullable: true),
                    HighC0 = table.Column<float>(type: "real", nullable: true),
                    High0UnbalanceRate = table.Column<float>(type: "real", nullable: true),
                    WindingMethod = table.Column<int>(type: "int", nullable: false, comment: "被试绕组"),
                    Result = table.Column<int>(type: "int", nullable: true, comment: "试验结果"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DcResistance", x => x.Id);
                    table.ForeignKey(
                        name: "FK_DcResistance_EquipmentInfo_EquipmentInfoId",
                        column: x => x.EquipmentInfoId,
                        principalTable: "EquipmentInfo",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_DcResistance_ExperimentTask_ExperimentTaskId",
                        column: x => x.ExperimentTaskId,
                        principalTable: "ExperimentTask",
                        principalColumn: "Id");
                },
                comment: "直阻试验信息");

            migrationBuilder.CreateTable(
                name: "InsulationResistance",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    FactoryNumbe = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "出厂编号"),
                    ExperimentTaskId = table.Column<long>(type: "bigint", nullable: true, comment: "试验任务ID"),
                    EquipmentInfoId = table.Column<long>(type: "bigint", nullable: false, comment: "设备Id"),
                    AmbientTemperature = table.Column<float>(type: "real", nullable: true, comment: "环境温度"),
                    AmbientHumidity = table.Column<float>(type: "real", nullable: true, comment: "环境湿度"),
                    TestType = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "试验类型"),
                    Position = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "测试部位"),
                    TestVoltage = table.Column<float>(type: "real", nullable: true, comment: "试验电压"),
                    AbsorptionRatio = table.Column<float>(type: "real", nullable: true, comment: "吸收比"),
                    R15 = table.Column<float>(type: "real", nullable: true, comment: "R15"),
                    R60 = table.Column<float>(type: "real", nullable: true, comment: "R60"),
                    Result = table.Column<int>(type: "int", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_InsulationResistance", x => x.Id);
                    table.ForeignKey(
                        name: "FK_InsulationResistance_EquipmentInfo_EquipmentInfoId",
                        column: x => x.EquipmentInfoId,
                        principalTable: "EquipmentInfo",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_InsulationResistance_ExperimentTask_ExperimentTaskId",
                        column: x => x.ExperimentTaskId,
                        principalTable: "ExperimentTask",
                        principalColumn: "Id");
                },
                comment: "绝缘电阻试验信息");

            migrationBuilder.CreateTable(
                name: "LoadTest",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    FactoryNumbe = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "出厂编号"),
                    ExperimentTaskId = table.Column<long>(type: "bigint", nullable: true, comment: "试验任务ID"),
                    EquipmentInfoId = table.Column<long>(type: "bigint", nullable: false, comment: "设备Id"),
                    AmbientTemperature = table.Column<float>(type: "real", nullable: true, comment: "环境温度"),
                    AmbientHumidity = table.Column<float>(type: "real", nullable: true, comment: "环境湿度"),
                    IsSinglePhase = table.Column<bool>(type: "bit", nullable: false, comment: "是否单相"),
                    TappingGear = table.Column<int>(type: "int", nullable: false, comment: "分接位置"),
                    UrmsAB = table.Column<float>(type: "real", nullable: true, comment: "有效值电压AB"),
                    UrmsBC = table.Column<float>(type: "real", nullable: true),
                    UrmsCA = table.Column<float>(type: "real", nullable: true),
                    UrmsAverage = table.Column<float>(type: "real", nullable: true),
                    IrmsAB = table.Column<float>(type: "real", nullable: true, comment: "有效值电流AB"),
                    IrmsBC = table.Column<float>(type: "real", nullable: true),
                    IrmsCA = table.Column<float>(type: "real", nullable: true),
                    IrmsAverage = table.Column<float>(type: "real", nullable: true),
                    PAB = table.Column<float>(type: "real", nullable: true, comment: "有功功率AB"),
                    PBC = table.Column<float>(type: "real", nullable: true),
                    PCA = table.Column<float>(type: "real", nullable: true),
                    SigmaP = table.Column<float>(type: "real", nullable: true, comment: "有功功率和"),
                    Frequency = table.Column<float>(type: "real", nullable: true, comment: "频率"),
                    PowerFactor = table.Column<float>(type: "real", nullable: true, comment: "功率因数"),
                    Pk75 = table.Column<float>(type: "real", nullable: true, comment: "负载损耗(KW)"),
                    Uk75 = table.Column<float>(type: "real", nullable: true, comment: "阻抗电压(%)"),
                    Zk75 = table.Column<float>(type: "real", nullable: true, comment: "短路阻抗(Q)"),
                    Result = table.Column<int>(type: "int", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_LoadTest", x => x.Id);
                    table.ForeignKey(
                        name: "FK_LoadTest_EquipmentInfo_EquipmentInfoId",
                        column: x => x.EquipmentInfoId,
                        principalTable: "EquipmentInfo",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_LoadTest_ExperimentTask_ExperimentTaskId",
                        column: x => x.ExperimentTaskId,
                        principalTable: "ExperimentTask",
                        principalColumn: "Id");
                },
                comment: "负载试验信息");

            migrationBuilder.CreateTable(
                name: "NoLoadTest",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    FactoryNumbe = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "出厂编号"),
                    ExperimentTaskId = table.Column<long>(type: "bigint", nullable: true, comment: "试验任务ID"),
                    EquipmentInfoId = table.Column<long>(type: "bigint", nullable: false, comment: "设备Id"),
                    AmbientTemperature = table.Column<float>(type: "real", nullable: true, comment: "环境温度"),
                    AmbientHumidity = table.Column<float>(type: "real", nullable: true, comment: "环境湿度"),
                    UrmsAB = table.Column<float>(type: "real", nullable: true, comment: "有效值电压AB"),
                    UrmsBC = table.Column<float>(type: "real", nullable: true),
                    UrmsCA = table.Column<float>(type: "real", nullable: true),
                    UrmsAverage = table.Column<float>(type: "real", nullable: true),
                    UrecAB = table.Column<float>(type: "real", nullable: true, comment: "平均值电压AB"),
                    UrecBC = table.Column<float>(type: "real", nullable: true),
                    UrecCA = table.Column<float>(type: "real", nullable: true),
                    UrecAverage = table.Column<float>(type: "real", nullable: true),
                    IrmsAB = table.Column<float>(type: "real", nullable: true, comment: "有效值电流AB"),
                    IrmsBC = table.Column<float>(type: "real", nullable: true),
                    IrmsCA = table.Column<float>(type: "real", nullable: true),
                    IrmsAverage = table.Column<float>(type: "real", nullable: true),
                    PAB = table.Column<float>(type: "real", nullable: true, comment: "有功功率AB"),
                    PBC = table.Column<float>(type: "real", nullable: true),
                    PCA = table.Column<float>(type: "real", nullable: true),
                    SigmaP = table.Column<float>(type: "real", nullable: true, comment: "有功功率和"),
                    IsSinglePhase = table.Column<bool>(type: "bit", nullable: false, comment: "是否单相"),
                    TappingGear = table.Column<int>(type: "int", nullable: false, comment: "分接位置"),
                    Frequency = table.Column<float>(type: "real", nullable: true, comment: "频率"),
                    PowerFactor = table.Column<float>(type: "real", nullable: true, comment: "功率因数"),
                    KF = table.Column<float>(type: "real", nullable: true, comment: "波形因数"),
                    I0 = table.Column<float>(type: "real", nullable: true, comment: "空载电流(%)"),
                    P0 = table.Column<float>(type: "real", nullable: true, comment: "空载损耗(KW)"),
                    Result = table.Column<int>(type: "int", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_NoLoadTest", x => x.Id);
                    table.ForeignKey(
                        name: "FK_NoLoadTest_EquipmentInfo_EquipmentInfoId",
                        column: x => x.EquipmentInfoId,
                        principalTable: "EquipmentInfo",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_NoLoadTest_ExperimentTask_ExperimentTaskId",
                        column: x => x.ExperimentTaskId,
                        principalTable: "ExperimentTask",
                        principalColumn: "Id");
                },
                comment: "空载试验信息");

            migrationBuilder.CreateTable(
                name: "PfwvTest",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    FactoryNumbe = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "出厂编号"),
                    ExperimentTaskId = table.Column<long>(type: "bigint", nullable: true, comment: "试验任务ID"),
                    EquipmentInfoId = table.Column<long>(type: "bigint", nullable: false, comment: "设备Id"),
                    AmbientTemperature = table.Column<float>(type: "real", nullable: true, comment: "环境温度"),
                    AmbientHumidity = table.Column<float>(type: "real", nullable: true, comment: "环境湿度"),
                    AtmosphericPressure = table.Column<float>(type: "real", nullable: true, comment: "大气压力"),
                    PressurizedPart = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "加压部位"),
                    TestVoltage = table.Column<float>(type: "real", nullable: true, comment: "试验电压"),
                    TestTime = table.Column<int>(type: "int", nullable: true, comment: "试验时间"),
                    Result = table.Column<int>(type: "int", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_PfwvTest", x => x.Id);
                    table.ForeignKey(
                        name: "FK_PfwvTest_EquipmentInfo_EquipmentInfoId",
                        column: x => x.EquipmentInfoId,
                        principalTable: "EquipmentInfo",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_PfwvTest_ExperimentTask_ExperimentTaskId",
                        column: x => x.ExperimentTaskId,
                        principalTable: "ExperimentTask",
                        principalColumn: "Id");
                },
                comment: "工频耐压试验信息");

            migrationBuilder.CreateTable(
                name: "RejectDeal",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    Code = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "不良品处理单编号"),
                    ExperimentTaskId = table.Column<long>(type: "bigint", nullable: false, comment: "试验任务ID"),
                    IsMRBAdvice = table.Column<bool>(type: "bit", nullable: true, comment: "是否需要MRB评审"),
                    RejectAdvice = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "不良品处理建议"),
                    MRBAdvice = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "MRB评审建议"),
                    Result = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "最终判定结果"),
                    Status = table.Column<int>(type: "int", nullable: false, comment: "不良品处理单状态"),
                    DealTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "处理时间"),
                    DealUser = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "处理人"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RejectDeal", x => x.Id);
                    table.ForeignKey(
                        name: "FK_RejectDeal_ExperimentTask_ExperimentTaskId",
                        column: x => x.ExperimentTaskId,
                        principalTable: "ExperimentTask",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "不良品处理");

            migrationBuilder.CreateTable(
                name: "TransformationRatio",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    FactoryNumbe = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "出厂编号"),
                    ExperimentTaskId = table.Column<long>(type: "bigint", nullable: true, comment: "试验任务ID"),
                    EquipmentInfoId = table.Column<long>(type: "bigint", nullable: false, comment: "仪器设备Id"),
                    AmbientTemperature = table.Column<float>(type: "real", nullable: true, comment: "环境温度"),
                    AmbientHumidity = table.Column<float>(type: "real", nullable: true, comment: "环境湿度"),
                    TappingGear = table.Column<int>(type: "int", nullable: false, comment: "分接位置"),
                    WiringMode = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "联接组别号"),
                    HighAB = table.Column<float>(type: "real", nullable: true, comment: "高压AB"),
                    HighBC = table.Column<float>(type: "real", nullable: true),
                    HighCA = table.Column<float>(type: "real", nullable: true),
                    Lowab = table.Column<float>(type: "real", nullable: true, comment: "低压ab"),
                    Lowbc = table.Column<float>(type: "real", nullable: true),
                    Lowca = table.Column<float>(type: "real", nullable: true),
                    TurnsRatioA = table.Column<float>(type: "real", nullable: true, comment: "变比A"),
                    TurnsRatioB = table.Column<float>(type: "real", nullable: true),
                    TurnsRatioC = table.Column<float>(type: "real", nullable: true),
                    DeviationA = table.Column<float>(type: "real", nullable: true, comment: "误差A"),
                    DeviationB = table.Column<float>(type: "real", nullable: true),
                    DeviationC = table.Column<float>(type: "real", nullable: true),
                    AngleAb = table.Column<float>(type: "real", nullable: true, comment: "角度AB"),
                    AngleBc = table.Column<float>(type: "real", nullable: true),
                    AngleCa = table.Column<float>(type: "real", nullable: true),
                    Result = table.Column<int>(type: "int", nullable: true),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_TransformationRatio", x => x.Id);
                    table.ForeignKey(
                        name: "FK_TransformationRatio_EquipmentInfo_EquipmentInfoId",
                        column: x => x.EquipmentInfoId,
                        principalTable: "EquipmentInfo",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_TransformationRatio_ExperimentTask_ExperimentTaskId",
                        column: x => x.ExperimentTaskId,
                        principalTable: "ExperimentTask",
                        principalColumn: "Id");
                },
                comment: "变比试验信息");

            migrationBuilder.CreateTable(
                name: "ExperimentPlanProduct",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    ExperimentPlanId = table.Column<long>(type: "bigint", nullable: false, comment: "计划Id"),
                    ProductId = table.Column<long>(type: "bigint", nullable: false, comment: "产品Id"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ExperimentPlanProduct", x => x.Id);
                    table.ForeignKey(
                        name: "FK_ExperimentPlanProduct_ExperimentPlan_ExperimentPlanId",
                        column: x => x.ExperimentPlanId,
                        principalTable: "ExperimentPlan",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_ExperimentPlanProduct_Product_ProductId",
                        column: x => x.ProductId,
                        principalTable: "Product",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateTable(
                name: "RejectItem",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    RejectDealId = table.Column<long>(type: "bigint", nullable: false, comment: "不良品处理ID"),
                    Reason = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "不良品原因"),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "不良描述"),
                    CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    ValidStatus = table.Column<bool>(type: "bit", nullable: false, comment: "有效性"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    TenantId = table.Column<long>(type: "bigint", nullable: true, comment: "租户id")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RejectItem", x => x.Id);
                    table.ForeignKey(
                        name: "FK_RejectItem_RejectDeal_RejectDealId",
                        column: x => x.RejectDealId,
                        principalTable: "RejectDeal",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                },
                comment: "不良品原因记录");

            migrationBuilder.InsertData(
                table: "SysTenant",
                columns: new[] { "Id", "AdminName", "CreatedTime", "CreatedUserId", "CreatedUserName", "Email", "Name", "Phone", "Remark", "Sort", "UpdatedTime", "UpdatedUserId", "UpdatedUserName", "ValidStatus" },
                values: new object[] { 142307070918780L, "DefaultAdmin", new DateTime(2024, 12, 23, 12, 15, 44, 631, DateTimeKind.Local).AddTicks(1812), null, null, "1617032371@qq.com", "默认租户", "138****0205", "默认租户", 99, null, null, null, true });

            migrationBuilder.InsertData(
                table: "Team",
                columns: new[] { "Id", "CreatedTime", "CreatedUserId", "CreatedUserName", "ExperimentStationId", "Name", "Remark", "Sort", "TenantId", "UpdatedTime", "UpdatedUserId", "UpdatedUserName", "ValidStatus", "WorkName" },
                values: new object[] { 242307070910559L, new DateTime(2024, 12, 23, 12, 15, 44, 720, DateTimeKind.Local).AddTicks(7815), null, null, null, "默认班组", "系统默认", 99, 142307070918780L, null, null, null, true, "默认车间" });

            migrationBuilder.InsertData(
                table: "SysUser",
                columns: new[] { "Id", "Account", "AdminType", "Avatar", "Birthday", "CreatedTime", "CreatedUserId", "CreatedUserName", "Email", "LastLoginIp", "LastLoginTime", "Name", "Password", "Phone", "Sex", "Sort", "TeamId", "Tel", "TenantId", "UpdatedTime", "UpdatedUserId", "UpdatedUserName", "ValidStatus" },
                values: new object[] { 142307070910551L, "admin", 1, null, null, new DateTime(2024, 12, 23, 12, 15, 44, 632, DateTimeKind.Local).AddTicks(4446), null, null, null, null, null, null, "e10adc3949ba59abbe56e057f20f883e", null, 0, 99, 242307070910559L, null, 142307070918780L, null, null, null, true });

            migrationBuilder.CreateIndex(
                name: "IX_AcsdTest_EquipmentInfoId",
                table: "AcsdTest",
                column: "EquipmentInfoId");

            migrationBuilder.CreateIndex(
                name: "IX_AcsdTest_ExperimentTaskId",
                table: "AcsdTest",
                column: "ExperimentTaskId");

            migrationBuilder.CreateIndex(
                name: "IX_ChromTest_EquipmentInfoId",
                table: "ChromTest",
                column: "EquipmentInfoId");

            migrationBuilder.CreateIndex(
                name: "IX_ChromTest_ExperimentTaskId",
                table: "ChromTest",
                column: "ExperimentTaskId");

            migrationBuilder.CreateIndex(
                name: "IX_DcResistance_EquipmentInfoId",
                table: "DcResistance",
                column: "EquipmentInfoId");

            migrationBuilder.CreateIndex(
                name: "IX_DcResistance_ExperimentTaskId",
                table: "DcResistance",
                column: "ExperimentTaskId");

            migrationBuilder.CreateIndex(
                name: "IX_EquipmentInfo_EquipmentCategoryId",
                table: "EquipmentInfo",
                column: "EquipmentCategoryId");

            migrationBuilder.CreateIndex(
                name: "IX_EquipmentInfo_EquipmentFactoryId",
                table: "EquipmentInfo",
                column: "EquipmentFactoryId");

            migrationBuilder.CreateIndex(
                name: "IX_EquipmentInfo_ExperimentStationId",
                table: "EquipmentInfo",
                column: "ExperimentStationId");

            migrationBuilder.CreateIndex(
                name: "IX_EquipmentRepair_EquipmentId",
                table: "EquipmentRepair",
                column: "EquipmentId");

            migrationBuilder.CreateIndex(
                name: "IX_ExperimentPlan_InspectionSchemeId",
                table: "ExperimentPlan",
                column: "InspectionSchemeId");

            migrationBuilder.CreateIndex(
                name: "IX_ExperimentPlan_TeamId",
                table: "ExperimentPlan",
                column: "TeamId");

            migrationBuilder.CreateIndex(
                name: "IX_ExperimentPlanMaterial_ExperimentPlanId",
                table: "ExperimentPlanMaterial",
                column: "ExperimentPlanId");

            migrationBuilder.CreateIndex(
                name: "IX_ExperimentPlanMaterial_MaterialId",
                table: "ExperimentPlanMaterial",
                column: "MaterialId");

            migrationBuilder.CreateIndex(
                name: "IX_ExperimentPlanProduct_ExperimentPlanId",
                table: "ExperimentPlanProduct",
                column: "ExperimentPlanId");

            migrationBuilder.CreateIndex(
                name: "IX_ExperimentPlanProduct_ProductId",
                table: "ExperimentPlanProduct",
                column: "ProductId");

            migrationBuilder.CreateIndex(
                name: "IX_ExperimentTask_ExperimentPlanId",
                table: "ExperimentTask",
                column: "ExperimentPlanId");

            migrationBuilder.CreateIndex(
                name: "IX_InspectionData_InspectionSchemeId",
                table: "InspectionData",
                column: "InspectionSchemeId");

            migrationBuilder.CreateIndex(
                name: "IX_InspectionDataResult_InspectionDataId",
                table: "InspectionDataResult",
                column: "InspectionDataId");

            migrationBuilder.CreateIndex(
                name: "IX_InsulationResistance_EquipmentInfoId",
                table: "InsulationResistance",
                column: "EquipmentInfoId");

            migrationBuilder.CreateIndex(
                name: "IX_InsulationResistance_ExperimentTaskId",
                table: "InsulationResistance",
                column: "ExperimentTaskId");

            migrationBuilder.CreateIndex(
                name: "IX_LoadTest_EquipmentInfoId",
                table: "LoadTest",
                column: "EquipmentInfoId");

            migrationBuilder.CreateIndex(
                name: "IX_LoadTest_ExperimentTaskId",
                table: "LoadTest",
                column: "ExperimentTaskId");

            migrationBuilder.CreateIndex(
                name: "IX_Material_SupplierId",
                table: "Material",
                column: "SupplierId");

            migrationBuilder.CreateIndex(
                name: "IX_NoLoadTest_EquipmentInfoId",
                table: "NoLoadTest",
                column: "EquipmentInfoId");

            migrationBuilder.CreateIndex(
                name: "IX_NoLoadTest_ExperimentTaskId",
                table: "NoLoadTest",
                column: "ExperimentTaskId");

            migrationBuilder.CreateIndex(
                name: "IX_PfwvTest_EquipmentInfoId",
                table: "PfwvTest",
                column: "EquipmentInfoId");

            migrationBuilder.CreateIndex(
                name: "IX_PfwvTest_ExperimentTaskId",
                table: "PfwvTest",
                column: "ExperimentTaskId");

            migrationBuilder.CreateIndex(
                name: "IX_Product_CategoryId",
                table: "Product",
                column: "CategoryId");

            migrationBuilder.CreateIndex(
                name: "IX_Product_ProjectDrawingId",
                table: "Product",
                column: "ProjectDrawingId");

            migrationBuilder.CreateIndex(
                name: "IX_ProductCategory_PrintTemplateId",
                table: "ProductCategory",
                column: "PrintTemplateId");

            migrationBuilder.CreateIndex(
                name: "IX_ProjectDrawing_ProductCategoryId",
                table: "ProjectDrawing",
                column: "ProductCategoryId");

            migrationBuilder.CreateIndex(
                name: "IX_RejectDeal_ExperimentTaskId",
                table: "RejectDeal",
                column: "ExperimentTaskId");

            migrationBuilder.CreateIndex(
                name: "IX_RejectItem_RejectDealId",
                table: "RejectItem",
                column: "RejectDealId");

            migrationBuilder.CreateIndex(
                name: "IX_SysDictData_DictTypeId",
                table: "SysDictData",
                column: "DictTypeId");

            migrationBuilder.CreateIndex(
                name: "IX_SysRoleMenu_SysMenuId",
                table: "SysRoleMenu",
                column: "SysMenuId");

            migrationBuilder.CreateIndex(
                name: "IX_SysUser_TeamId",
                table: "SysUser",
                column: "TeamId");

            migrationBuilder.CreateIndex(
                name: "IX_SysUserRole_SysRoleId",
                table: "SysUserRole",
                column: "SysRoleId");

            migrationBuilder.CreateIndex(
                name: "IX_Team_ExperimentStationId",
                table: "Team",
                column: "ExperimentStationId");

            migrationBuilder.CreateIndex(
                name: "IX_TransformationRatio_EquipmentInfoId",
                table: "TransformationRatio",
                column: "EquipmentInfoId");

            migrationBuilder.CreateIndex(
                name: "IX_TransformationRatio_ExperimentTaskId",
                table: "TransformationRatio",
                column: "ExperimentTaskId");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "AcsdTest");

            migrationBuilder.DropTable(
                name: "ChromTest");

            migrationBuilder.DropTable(
                name: "DcResistance");

            migrationBuilder.DropTable(
                name: "DealOpinion");

            migrationBuilder.DropTable(
                name: "DefectiveReason");

            migrationBuilder.DropTable(
                name: "EquipmentRepair");

            migrationBuilder.DropTable(
                name: "ExperimentPlanMaterial");

            migrationBuilder.DropTable(
                name: "ExperimentPlanProduct");

            migrationBuilder.DropTable(
                name: "InspectionDataResult");

            migrationBuilder.DropTable(
                name: "InspectionItem");

            migrationBuilder.DropTable(
                name: "InsulationResistance");

            migrationBuilder.DropTable(
                name: "LoadTest");

            migrationBuilder.DropTable(
                name: "NoLoadTest");

            migrationBuilder.DropTable(
                name: "PfwvTest");

            migrationBuilder.DropTable(
                name: "RejectItem");

            migrationBuilder.DropTable(
                name: "SerialNumberLog");

            migrationBuilder.DropTable(
                name: "SerialNumberRules");

            migrationBuilder.DropTable(
                name: "SysDictData");

            migrationBuilder.DropTable(
                name: "SysFile");

            migrationBuilder.DropTable(
                name: "SysFileGroup");

            migrationBuilder.DropTable(
                name: "SysLogEx");

            migrationBuilder.DropTable(
                name: "SysLogOp");

            migrationBuilder.DropTable(
                name: "SysLogVis");

            migrationBuilder.DropTable(
                name: "SysNotice");

            migrationBuilder.DropTable(
                name: "SysRoleMenu");

            migrationBuilder.DropTable(
                name: "SysTenant");

            migrationBuilder.DropTable(
                name: "SysUserRole");

            migrationBuilder.DropTable(
                name: "TransformationRatio");

            migrationBuilder.DropTable(
                name: "Material");

            migrationBuilder.DropTable(
                name: "Product");

            migrationBuilder.DropTable(
                name: "InspectionData");

            migrationBuilder.DropTable(
                name: "RejectDeal");

            migrationBuilder.DropTable(
                name: "SysDictType");

            migrationBuilder.DropTable(
                name: "SysMenu");

            migrationBuilder.DropTable(
                name: "SysRole");

            migrationBuilder.DropTable(
                name: "SysUser");

            migrationBuilder.DropTable(
                name: "EquipmentInfo");

            migrationBuilder.DropTable(
                name: "Supplier");

            migrationBuilder.DropTable(
                name: "ProjectDrawing");

            migrationBuilder.DropTable(
                name: "ExperimentTask");

            migrationBuilder.DropTable(
                name: "EquipmentCategory");

            migrationBuilder.DropTable(
                name: "EquipmentFactory");

            migrationBuilder.DropTable(
                name: "ProductCategory");

            migrationBuilder.DropTable(
                name: "ExperimentPlan");

            migrationBuilder.DropTable(
                name: "PrintTemplate");

            migrationBuilder.DropTable(
                name: "InspectionScheme");

            migrationBuilder.DropTable(
                name: "Team");

            migrationBuilder.DropTable(
                name: "ExperimentStation");
        }
    }
}
